home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Games
/
1,000 Games - Disk 2.iso
/
card
/
cribbage
/
cribbage.doc
< prev
next >
Wrap
Text File
|
1993-06-24
|
20KB
|
458 lines
===================
Cribbage
from
Universal Software
-------------------
Copyright (c) 1993
David A. Teach
-------------------
Version 1.2
===================
Requirements / Recommendations to play
======================================
Requires EGA, VGA, MDA, AT&T 400, PC 3270, or Hercules graphics system.
A Microsoft, Logitech, or compatible mouse is recommended.
Three button rodents work better for the hint feature.
An IBM or compatible AT computer with 8 mHz or faster CPU speed is
also recommended.
How to play this computer game
==============================
When using the mouse, commands are selected with either the Left or
Right mouse buttons. When in keyboard mode, the numbers or letters for
the commands are highlighted in light green; or on monochrome displays
the appropriate key is bright white or underlined.
When the information box pops up in the middle of the screen during
play, it will stay on the screen for 5 seconds. Hit any key or mouse
button to clear it quicker.
***** Note *****
The keyboard commands are only possible if a mouse is not detected, or
if you are in forced keyboard mode; otherwise, the mouse is the default
selecting device.
***** Hercules graphics users: The mouse pointer doesn't seem to work
when I simulate Hercules graphics on my VGA card, but it might work on
a real Hercules graphics machine. If not, disable the mouse or use the
KEYBOARD option.
***** Monochrome EGA/VGA and/or 64k EGA users: If the colors don't come
out correctly or if you cannot go to the Options or Stats screens, try
using the LAPTOP command line parameter. I set this up to force the
program into 2 color/1 video page on these systems. With all other
configurations the LAPTOP toggle works normally.
The Title Screen:
BEGIN GAME -
Typing 'B' or clicking the left or right mouse button on the BEGIN
GAME box starts the game with the shown options. Hitting ENTER will
also choose this.
OPTIONS -
Typing 'O' or clicking on OPTIONS will bring up the game Options
Menu. See "Options Menu" below for the list of options.
STATISTICS -
This displays the current player's cumulative game statistics. Users
of the keyboard hit the 'S' key.
QUIT -
QUIT will exit the program. Type 'Q' from the keyboard.
The Options Menu:
MAIN MENU -
This option will bring you back to the main menu. (Title screen) You
can hit the letter 'M' or the ENTER key to select this in keyboard mode.
NAME -
The default name is 'PLAYER'. You can change this by typing 'N'
or clicking the mouse pointer within the red box around the name, typing
a new name, and pressing ENTER (or a mouse button). Backspace is the
only editing key allowed if you make an error while typing in the name.
Upper and lower case letters, numbers 0 through 9, characters ! . , " -
: / ? and spaces are also allowed. The name can be a maximum of eight
characters long.
SCORE LIMIT -
Clicking on SCORE LIMIT cycles the pegging board total between 121
and 61 pegs. Use either mouse button, or the + or - keys.
SKUNKING -
Changing the SKUNKING option to YES will allow a skunk win. If a
player fails to reach the skunk point (limit - 30) with at least one peg
by the end of a game, this counts a 2 wins. When playing to 121 points,
the skunk line is after the 90th hole; for a 61 point limit it is after
the 30th. This may also be called a "lurch" by some players. Double
skunk (halfway for 121 limit) is NOT implemented. Hit the 'K' key from
the keyboard to toggle skunking on or off.
BIG CARDS -
The default card set has more realistic-looking cards, but the suits
may be a little small for some people to see clearly. If this is so,
or you just like the one pip better, changing this option to YES will
give you cards with one big number and one big symbol for the suit.
Hit the letter 'B' to switch this option to YES or NO.
POINTER -
Clicking on this option will change the shape of the mouse pointer.
There are seven different shapes to choose from. Obviously, this will
not have any effect if you are not using a mouse, but 'P' still toggles.
SAVE -
Selecting SAVE will save all options to the CRIBBAGE.CFG file. This
file is loaded when the program is run, so your name and your favorite
options are already set. If this file is not present, or is corrupted,
it will be created with the default options. At present, the NOBLANK
option is not saved in this configuration file. 'S' from the keyboard.
Player Statistics Screen:
Clicking within the Main Menu box will bring you back to the main
menu. (Title screen) You can hit the letter M or the ENTER key to
select this in keyboard mode.
Rules of the Game - Taken from "Official Rules of Card Games",
================= 62nd edition, U.S Playing Card Company, 1968
Rank of cards:
(High) K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2, A.
The Deal:
Each player receives 6 cards. The players then choose two cards to
discard. The four cards discarded by the two players constitute the
CRIB, which always belongs to the dealer.
After both players have discarded their two cards, the deck is cut
and one card is placed face up from the deck. This card is the STARTER.
If the STARTER is a JACK then the dealer PEGS (scores) 2 points.
Game play:
After the STARTER has been turned, play begins with the non-dealer
laying down a card face up on the table. The dealer then next exposes
a card with the play alternating between the two players, except for
GO's as noted below. Each time a player lays down a card he announces
the sum of all the cards that have been laid down so far.
During play, the sum can never exceed 31. If a player cannot play a
card without exceeding 31 he must say GO and his opponent pegs 1 point.
Before pegging his 1 point the player gaining the GO must lay down all
the cards he can without exceeding 31. If a player reaches exactly 31
then he pegs 2 points instead of 1 point for the GO. The player who
said GO starts off the next round of play, and sum is reset to zero.
The object in play is to score points by pegging. In addition to the
GO, a player may peg points in the following combinations:
Pegging Combinations:
FIFTEEN
You peg 2 points for adding a card that makes the sum equal to 15.
PAIR
You peg 2 points if you match the rank of the previously played card.
TRIPLET
Adding the third card (in a row) of the same rank scores 6 points.
FOUR
Adding the fourth card (in a row) of the same rank pegs 12 points.
RUN (Sequence)
For adding a card that forms with previously played cards a sequence
of 3 or more, in any order, you peg 1 point for each card in the sequence.
Runs are independent of suits and can be played in any order.
Example: 3-4-5, 3-5-4, 5-2-4-3, etc.
Scoring Hands:
When play ends, the three hands are counted in order: non-dealer, then
dealer's hand, then CRIB. This order is important, since toward the end of
a game a player might be able to reach a winning score before his opponent
has a chance to count his hand. The STARTER is considered a part of each
hand, so all three hands contain five cards when scored.
The following describes the basic formations for scoring the hands:
FIFTEEN
2 points for each combination of cards that total 15.
PAIR
2 points for each pair of cards of the same rank.
RUN
Each combination of 3 or more cards in sequence counts 1 point for
each card in the RUN.
FLUSH
Four cards of the same suit (not including the STARTER) is 4 points.
If the STARTER is also the same suit, count 5 points instead of 4.
Only a 5 card flush counts in the CRIB.
JACK
Holding a JACK of the same suit as the STARTER counts as 1 point.
**** Note: EACH and EVERY combination counts separately. ****
Example:
A hand (with STARTER) of 8,7,7,6,2 will score 16 points. How ???
For four combinations that total FIFTEEN: the 8 with one 7 and also with
the other 7, and the 6-2 combined with the two 7s will score 8 points.
It also scores 2 for the PAIR of 7s, and 6 points for the two RUNS of
three: 8-7-6, using each 7 in turn.
(If you can't remember all this, don't worry; the computer does all the
laying-off, counting, and rule enforcement for you.)
Winning and Losing:
The game ends the moment a player reaches the agreed score limit
whether by pegging or counting his hand. Once a player reaches the
last peg hole, no further points are counted.
Hints -
The center button (recommended), or both left and right buttons
pressed simultaneously will ask the computer for a hint. When using
the keyboard, the letter H brings up the hint suggestion.
CAREFUL: If you are using both left and right mouse buttons to ask for
hints, you must make sure that the mouse pointer is NOT OVER a regular
choice area, (deck, card in hand, quit, etc.) or else the game will
usually think that you made a normal choice with a single button. If
you have a center button, use that instead; this will work for hints
ANYWHERE on the screen, even over normal choice areas.
IF YOU HAVE A THREE BUTTON MOUSE, BUT THE CENTER BUTTON DOESN'T DO
ANYTHING, you probably are using a different mouse driver than the one
which came with your mouse. A three button mouse MUST be driven by a
three button mouse driver. Most of the Microsoft mouse driver programs
are for two button rodents. They seem to work fine for all operations
of the mouse except for the center button. If you have a problem, look
around the BBS's for a newer mouse driver, (I use Logitech mouse driver
version 6.10) or contact the company where you purchased your mouse.
The Screen Saver -
If no keyboard or mouse input is detected for a certain amount of
time during the game, the screen will blank out to prevent burn-in. The
time limit for this is set by the game score limit. The time of waiting
is 5 minutes for a score limit of 61, and 10 minutes for a score limit of
121. If your favorite score limit does not match your wanted screen saver
time, learn to live with it.
To activate the screen blanker immediately, move the mouse cursor
into the upper right hand corner and the screen will automatically blank
out. This can be handy for the traditional use of a "Boss key" function.
In keyboard mode, the ESCAPE KEY is the activation key.
*** NOTE: NO SCREEN BLANKING WILL OCCUR IF THE NOBLANK OPTION IS ON. ***
*** To get out of the blank screen, press any key or mouse button. ***
The Statistics file -
Also at the end of each game, the program checks for a stats file
called CRIBBAGE.STA in the current directory. If it is not there, it
is created. This file saves cumulative totals for average score in your
hand and in your crib, the total number of games won and lost, the total
number of hands played and the player's name. If your stats file is
corrupted, or you just want to clear the list and start over, erase (or
rename) the CRIBBAGE.STA file. You can have up to 20 different names
currently running in this stats file. If the current player name is not
found in this file, it is added to the top of the file with zero totals.
WARNING, if this addition makes more than 20 names, the name on the
bottom of the list (the oldest) is truncated.
******* If you quit a hand before the END of the game, the statistics
file WILL NOT be updated for the hands that were played. *******
******* If you are playing Cribbage on a write-protected or read-only
drive, the stats will start from zero when you start the game; they will
be kept for when you are in the program, but cannot be saved upon exit.
Use the command line path function to read and save to a writable drive.
Notes on the Computer player -
The computer does NOT "cheat" when playing. It does not look at your
crib when discarding, it does not look at your hand, or do any other
thing that a human player cannot do. The computer chooses its cards by
a set of fixed formulas that do not have any room for human "intuition"
or for many of the different possible arrangements of the hand that might
make a good human player choose a different discard than the computer.
The "Hint" function uses about the same formulas for choosing the
player's card(s) that the computer uses for its moves. This means that
if you depend too heavily on the hints, you will end up winning only
about half of your games.
Command Line Options:
The default setting for the two options NAME and SCORE LIMIT can be
set from the command line, overriding (but not overwriting) the
configuration file settings. This can be handy to set up some batch
files for different players on one machine.
At the DOS prompt, you can do the following:
To get a quick help screen for the command line options, type CRIBBAGE
followed by /? or ? or help or HELP. This must be the first parameter.
To list all of the contents of the statistics file from the DOS prompt,
(in case you forget who is in there) type: CRIBBAGE list
To set the SCORE LIMIT, type: CRIBBAGE 61 or CRIBBAGE 121
To have the game use your name instead of the default name, you can
state it as a command line option. ex. CRIBBAGE Dave
For the Command line option of Player Name, the length limit is 8
characters and the name must be ONE word. You can use BobSmith, or
Ron_Hill, etc., but typing Paul Schoenberger will give you Schoenbe for
your name. If you want a space in your name, you can put one in only
with the Name Change from the options menu.
The name used is the LAST word on the command line that is NOT otherwise
recognized as a command, so be sure not to have any gibberish on the
line when you start the game: CRIBBAGE Mike ASDF will make your name
ASDF not Mike.
To force the game to play in keyboard mode when a mouse is detected,
use the command line option KEYBOARD to enable keyboard play.
Be careful of mixing keyboard and mouse play. Since this game will
automatically select keyboard mode if a mouse is not detected, this
option should only be used if a mouse is falsely detected on your
computer, or you can't turn off your mouse and you need to play using
the keyboard.
To disable the screen saver function, use the word NOBLANK in your
command line options. This parameter will also disable the manual
screen blanking (boss key), since both are really the same function.
If you have a monochrome monitor, like on most LCD laptops, and you
aren't using a mouse, the switch LAPTOP will use a brighter shade for
the highlighted letters to make them easier to see.
If you want to have the configuration and save files read and saved
from or to a different drive or directory, you may specify a file path
on the command line. Valid paths must start with a backslash (\)
or a drive letter and colon (B:) or parent directory dots (..)
Valid path examples are:
CRIBBAGE A:
CRIBBAGE \GAMES\MYSAVE
CRIBBAGE D:\WORK\
CRIBBAGE \
CRIBBAGE ..
CRIBBAGE ..\STUFF
If just the drive letter is given, then the current path is used on
that drive. (meaning if you are in D:\GAMES and then change to drive C:
and run "CRIBBAGE D:" then your game files will be saved in D:\GAMES.
If a path is given, it is tested at game startup, and if it is invalid
for any reason, the current directory will be made the default path.
As always, if a path not is specified, the current directory is used.
To go directly into the game, bypassing the intro screen, use the
command GO from the DOS prompt. ex. CRIBBAGE John B:\ go
Since the game looks only at the first seven parameters given, too
much garbage on the command line might miss a legitimate option.
Example: CRIBBAGE 1 2 3 4 5 6 7 GO will NOT execute the GO command.
These options can be put in any order and are all case INsensitive
except for the Player Name.
======================================================================
This SHAREWARE program is written in Turbo Pascal Version 6.0
The Mouse unit is from the book "Turbo Pascal Advanced Programmer's
Guide" by Stephen K. O'Brian. This unit was slightly modified by me.
Please feel free to call or write to me if you have any questions,
comments, improvements, or find any bugs.
If you like this program and want to support the efforts of a shareware
programmer, please send cash or check for any amount that you feel my
Cribbage game is worth to you to:
David Teach
14304 46th Street #39
Tampa, FL 33613
Phone: (813) 975-1099
CompuServe ID: 70743,2753
If you send in the registration fee for CRIBBAGE, I will mail to you my
latest version and will also give you my other card game, GINRUMMY.
======================================================================
What is Shareware Software?
Shareware, or user-supported software, is a popular way of marketing
software for the program's author. Shareware software is copyrighted.
The authors encourage you copy their software and share it with friends.
If you like the program and continue using it, you should send in the
"registration fee". This is a wonderful deal for the consumer. If you
try a program and don't like it, you owe the author nothing.
However, if you find you are using the program, then it is only right
to pay the "registration fee" which usually ranges from $5.00 to $90.00
depending on the program. Please support these authors. They have
worked hard to give you their products and can only do so in the future
if you encourage them. Shareware software will then continue to flourish
and everyone will benefit. Where else can you "TRY BEFORE YOU BUY".
=========================================================================
Version History:
Version 1.2 - 06/25/93 - (better formulas, stats, new address)
- improved the formulas when choosing cards to discard that take
into consideration which player is holding the crib.
- changed stats to separately track the average number of points
in your hand and crib, and got rid of average hands per game.
- moved the mouse pointer away from the middle of the screen when
starting a new game to not block the box that says who deals.
- enhanced the logic when choosing a card to play for the hints
and for the computer player.
- fixed a bug that sometimes did not end a hand after all of the
cards were played.
- corrected an error which sometimes waited a turn before ending
a game when the human player pegged the last hole for a win.
- added CRC checksum self-validation of the executable file to
catch possible virus, hacking, or file corruption errors.
- changed my address and phone number for those who want to
register or have questions.
Version 1.1 - 03/30/93 - (a few quick fixes)
- fixed a minor bug that indented the cards incorrectly when the
dealer went next after a 'GO' was called.
- corrected a few spelling errors in the program and in the
documentation.
- changed some of the screen layout and colors.
Version 1.0 - 03/29/93 - (initial release)
- converted my GinRummy (4.1) card game to Cribbage.